package com.vecspace.dayu.code.template.pojo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Polymorphism;
import org.hibernate.annotations.PolymorphismType;

import com.vecspace.data.model.IdEntity;

@Entity
@Polymorphism(type = PolymorphismType.EXPLICIT)
@Table(name = "DAYU_CODE_FRAGMENT")
public class CodeFragment  implements IdEntity, java.io.Serializable{
	
	private static final long serialVersionUID = 4872092654995929314L;
	
	private Long id;
	private String name;
	private String code;
	private String codeTemplate;
	private Integer ordnum;
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "ID")
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	
	@Column(name = "NAME_")
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	@Column(name = "CODE_")
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}

	@Column(name = "CODE_TEMPLATE")
	public String getCodeTemplate() {
		return codeTemplate;
	}
	public void setCodeTemplate(String codeTemplate) {
		this.codeTemplate = codeTemplate;
	}	

	@Column(name = "ORDNUM")
	public Integer getOrdnum() {
		return ordnum;
	}
	public void setOrdnum(Integer ordnum) {
		this.ordnum = ordnum;
	}
	
	
}
